package com.qtyx.nms.mvp.presenter

import com.qtyx.nms.mvp.base.BaseBean
import com.qtyx.nms.mvp.base.BaseObserver
import com.qtyx.nms.mvp.base.BasePresenter
import com.qtyx.nms.mvp.view.MessageView

/**
 * 消息
 */
class MessagePresenter(val view: MessageView) :BasePresenter() {

    /**
     * 更新阅读状态
     */
    fun updateReadType(id:String){
        val map=LinkedHashMap<String,String>()
        map["id"]=id
        requestData(getApiServer().updateReadType("更新阅读状态", map), object : BaseObserver<BaseBean>(view,false) {
            override fun onSuccess(data: BaseBean)= view.updateStateSucceed()
            override fun onError(msg: String)= view.onError(msg)
        })
    }
}